package com.becca.cake.dao.payment;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.payment.InvoiceModel;
import com.becca.cake.model.payment.OrderRefundModel;
import com.becca.cake.model.payment.PaymentModel;

/**
 * 财务管理Dao接口
 * @copyright  尊星(上海)信息科技有限公司
 * @author yellow
 * @date 2016年5月20日 上午10:20:08
 */
@Repository
public interface PaymentDAO {
    /**
     * 查询财务列表数据
     * @param map
     * @return
     * @throws DataAccessException
     */
    List<PaymentModel> selectPayments(Map<String, Object> map) throws DataAccessException;

    /**
     * 获取查询财务总条数
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long selectPaymentsCount(Map<String, Object> map) throws DataAccessException;

    /**
     * 查询发票列表数据
     * @param map
     * @return
     * @throws DataAccessException
     */
    List<InvoiceModel> selectInvoices(Map<String, Object> map) throws DataAccessException;

    /**
     * 查询发票总条数
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long selectInvoicesCount(Map<String, Object> map) throws DataAccessException;

    /**
     * 批量修改是否已开票
     * @param map
     * @throws DataAccessException
     */
    void updIsReferenceInvoice(List<InvoiceModel> list) throws DataAccessException;

    /**
     * 订单退款查询列表
     * @param map
     * @return
     * @throws DataAccessException
     */
    List<OrderRefundModel> selectOrderRefunds(Map<String, Object> map) throws DataAccessException;

    /**
     * 订单退款查询总条数
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long selectOrderRefundsCount(Map<String, Object> map) throws DataAccessException;

    /**
     * 查询发票信息
     * @param orderIds
     * @return
     * @throws DataAccessException
     */
    List<InvoiceModel> selectOrderInvoicesById(@Param("orderIds") String orderIds)
                                                                                  throws DataAccessException;
}
